import time
res = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())


class AccountManage:
    def __init__(self, account_name, balance = float(0), currency = "RMB"):
        self.account_name = account_name
        self.balance = balance
        self.currency = currency
        self.note = []

    def transfer_into_account(self, amount):
        self.balance = self.balance + amount
        msg = f"{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        } 转入 {amount:.2f} {self.currency} {self.balance:.2f}"
        self.note.append(msg)

    def transfer_out_of_account(self, amount):
        if amount > self.balance:
            return
        self.balance = self.balance - amount
        msg = f"{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        } 网转 {amount:.2f} {self.currency} {self.balance:.2f}"
        self.note.append(msg)

    def consumption(self, amount):
        if amount > self.balance:
            return
        self.balance = self.balance - amount
        msg = f"{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        } 消费 {amount:.2f} {self.currency} {self.balance:.2f}"
        self.note.append(msg)

if __name__ == "__main__":
    a1 = AccountManage("zhang")
    a1.transfer_into_account(1000)
    a1.transfer_out_of_account(100)
    a1.consumption(100)
    for note in a1.note:
        print(note)